Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not fetch price history if price algorithm does not require it #230

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

xPaw
Copy link
Contributor

@xPaw xPaw commented Sep 22, 2024

It matches the code in calculateSellPriceBeforeFees

const shouldUseAverage = getSettingWithDefault(SETTING_PRICE_ALGORITHM) == 1;

else if (historyPrice < listingPrice || !shouldUseAverage) {
      calculatedPrice = listingPrice;
}

calculateAverageHistoryPriceBeforeFees returns 0 if history is null.

@Nuklon Nuklon merged commit 184fd21 into Nuklon:master Sep 25, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants